package com.dongdong.android.demo.ui.register;

/**
 * Created by dongdong on 2018/4/8.
 */

public class RegisterPresenter extends RegisterContract.Presenter {
    @Override
    public void onStart() {

    }

    @Override
    public void getCode(String phone) {

        mRxManager.add(mModel.getCode(phone).subscribe(res -> mView.onGetCodeResult(res), e -> mView.onResultError(e.toString())));
    }

    @Override
    public void register() {
        mRxManager.add(mModel.register().subscribe(res -> mView.onRegisterResult(res), e -> mView.onResultError(e.toString())));

    }


}
